'''
 虚拟环境：  !/usr/bin/env python
 -*- coding: utf-8 -*-
 @Time    : 2025/1/16 04:35
 @Author  : 小呆呆不爱睡觉
 @File    : 异常处理.py
 @Software: PyCharm
 @Project_name:pythonProject113
 '''


class Person:
    name = None
    sex = None


Person
zhangsan = Person()

try:
    print(zhangsan().name)
    print(zhangsan.name)
    print('正常代码可以运行')
except:

    print('异常代码')
